package com.ncu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ncu.domain.Active;
import com.ncu.service.ActiveService;
import com.ncu.mapper.ActiveMapper;
import com.ncu.vo.QueryPageBean;
import org.springframework.stereotype.Service;

/**
* @description 针对表【active】的数据库操作Service实现
*/
@Service
public class ActiveServiceImpl extends ServiceImpl<ActiveMapper, Active>
    implements ActiveService{

    public Page<Active> getSeatPage(QueryPageBean queryPageBean) {
        Page<Active> seatPage = new Page();
        seatPage.setCurrent((long)queryPageBean.getCurrentPage());
        seatPage.setSize((long)queryPageBean.getPageSize());
        QueryWrapper<Active> seatQueryWrapper = new QueryWrapper();
        seatQueryWrapper.like(queryPageBean.getQueryString()!=null&&queryPageBean.getQueryString()!="","content",queryPageBean.getQueryString());
        return page(seatPage, seatQueryWrapper);
    }

}




